package net.jjjshop.common.entity.lbt;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 交易订单表 Entity 实体类

 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("jyb_trade_order")
@ApiModel(value="JybTradeOrderEntity对象", description="交易订单表")
public class JybTradeOrderEntity implements Serializable {
	private static final long serialVersionUID = 1L;

			/**
			 *
			 */
			@ApiModelProperty(value = "记录ID")
			@TableId(value = "id", type = IdType.AUTO)
			private Integer id;

			/**
			 * 用户ID
			 */
			@ApiModelProperty(value = "用户ID")
			private Integer uid;
			/**
			 * 时间
			 */
			@ApiModelProperty(value = "时间")
			private Date createTime;
			/**
			 * 交易市场ID
			 */

			@ApiModelProperty(value = "交易市场ID")
			@NotNull(message = "交易ID不能为空")
			private Integer gid;
			/**
			 * 币数量
			 */
			@ApiModelProperty(value = "币数量")
			@DecimalMin(value = "5", message = "数量不能小于5")
			private BigDecimal num;
			/**
			 * 单价
			 */
			@ApiModelProperty(value = "单价")
			private BigDecimal price;
			/**
			 * 卖家ID
			 */

			@ApiModelProperty(value = "卖家ID")
//			@NotNull(message = "卖家不能为空")
			private Integer sellerId;
			/**
			 * 买家ID
			 */

			@ApiModelProperty(value = "买家ID")
//			@NotNull(message = "买家不能为空")
			private Integer buyerId;
			/**
			 * 订单编号
			 */
			@ApiModelProperty(value = "订单编号")
			private String no;
			/**
			 * 订单状态：0待支付，1，已付款，2，已完成，3已取消，4已超时
			 */
			@ApiModelProperty(value = "订单状态：0待支付，1，已付款，2，已完成，3已取消，4已超时,5客服取消")
			private Integer status;
			/**
			 * 订单凭证图片
			 */
			@ApiModelProperty(value = "订单凭证图片")
			private String voucherImg;
			/**
			 * 备注
			 */
			@ApiModelProperty(value = "备注")
			private String remarks;

	@ApiModelProperty(value = "收款记录ID")
//			@NotNull(message = "买家不能为空")
	private Integer payId;

	/**
	 * 商户应用
	 */
	@ApiModelProperty(value = "商户应用")
	private Integer appId;

	/**
	 * 真实姓名
	 */
	@ApiModelProperty(value = "收款姓名")
	@TableField(exist = false)
	private String name;
	/**
	 * 账号
	 */
	@ApiModelProperty(value = "收款账号")
	@TableField(exist = false)
	private String account;
	/**
	 * 银行名称
	 */
	@ApiModelProperty(value = "收款银行名称")
	@TableField(exist = false)
	private String bankName;
	/**
	 * 收款码
	 */
	@ApiModelProperty(value = "收款码")
	@TableField(exist = false)
	private String payImg;

	/**
	 * 支付方式
	 */
	@ApiModelProperty(value = "支付方式")
	@TableField(exist = false)
	private Integer payType;

	/**
	 * 卖家姓名
	 */
	@ApiModelProperty(value = "卖家姓名")
	@TableField(exist = false)
	private String sellerName;
	/**
	 * 卖家头像
	 */
	@ApiModelProperty(value = "卖家头像")
	@TableField(exist = false)
	private String sellerHead;
	/**
	 * 卖家头像
	 */
	@ApiModelProperty(value = "卖家电话")
	@TableField(exist = false)
	private String sellerPhone;

	/**
	 * 卖家姓名
	 */
	@ApiModelProperty(value = "买家姓名")
	@TableField(exist = false)
	private String buyerName;
	/**
	 * 卖家头像
	 */
	@ApiModelProperty(value = "买家头像")
	@TableField(exist = false)
	private String buyerHead;
	/**
	 * 卖家头像
	 */
	@ApiModelProperty(value = "买家电话")
	@TableField(exist = false)
	private String buyerPhone;
	/**
	 * 订单类型
	 */
	@ApiModelProperty(value = "交易类型：1挂卖，2回收")
	@TableField(exist = false)
	private Integer tType;
	/**
	 * 订单金额
	 */
	@ApiModelProperty(value = "订单金额")
	@TableField(exist = false)
	private BigDecimal total;

	@ApiModelProperty(value = "分类：0:权益卡、1佣金")
	private Integer classType;


}
